<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Freetype OpenGL: font-manager.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="style.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="content"><!-- do not remove this div! -->

<div id="top"><!-- do not remove this div! -->

  
  <div id="titlearea">
    
    <div id="projectname">Freetype OpenGL</div>
    
    
    <div id="projectbrief">A high quality OpenGL text rendering engine for C</div>
    
  </div>
  

<!--

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Freetype OpenGL
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">A high quality OpenGL text rendering engine for C</div>
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>
-->


<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript" src="dynsections.js"></script>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">font-manager.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="font-manager_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* ============================================================================</span>
<a name="l00002"></a>00002 <span class="comment"> * Freetype GL - A C OpenGL Freetype engine</span>
<a name="l00003"></a>00003 <span class="comment"> * Platform:    Any</span>
<a name="l00004"></a>00004 <span class="comment"> * WWW:         http://code.google.com/p/freetype-gl/</span>
<a name="l00005"></a>00005 <span class="comment"> * ----------------------------------------------------------------------------</span>
<a name="l00006"></a>00006 <span class="comment"> * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00009"></a>00009 <span class="comment"> * modification, are permitted provided that the following conditions are met:</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> *  1. Redistributions of source code must retain the above copyright notice,</span>
<a name="l00012"></a>00012 <span class="comment"> *     this list of conditions and the following disclaimer.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> *  2. Redistributions in binary form must reproduce the above copyright</span>
<a name="l00015"></a>00015 <span class="comment"> *     notice, this list of conditions and the following disclaimer in the</span>
<a name="l00016"></a>00016 <span class="comment"> *     documentation and/or other materials provided with the distribution.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER &#39;&#39;AS IS&#39;&#39; AND ANY EXPRESS OR</span>
<a name="l00019"></a>00019 <span class="comment"> * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span>
<a name="l00020"></a>00020 <span class="comment"> * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO</span>
<a name="l00021"></a>00021 <span class="comment"> * EVENT SHALL NICOLAS P. ROUGIER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,</span>
<a name="l00022"></a>00022 <span class="comment"> * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00023"></a>00023 <span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00024"></a>00024 <span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00025"></a>00025 <span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00026"></a>00026 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF</span>
<a name="l00027"></a>00027 <span class="comment"> * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00028"></a>00028 <span class="comment"> *</span>
<a name="l00029"></a>00029 <span class="comment"> * The views and conclusions contained in the software and documentation are</span>
<a name="l00030"></a>00030 <span class="comment"> * those of the authors and should not be interpreted as representing official</span>
<a name="l00031"></a>00031 <span class="comment"> * policies, either expressed or implied, of Nicolas P. Rougier.</span>
<a name="l00032"></a>00032 <span class="comment"> * ============================================================================</span>
<a name="l00033"></a>00033 <span class="comment"> */</span>
<a name="l00034"></a>00034 <span class="preprocessor">#ifndef __FONT_MANAGER_H__</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define __FONT_MANAGER_H__</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span>
<a name="l00037"></a>00037 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &quot;<a class="code" href="vector_8h.html">vector.h</a>&quot;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &quot;<a class="code" href="markup_8h.html">markup.h</a>&quot;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &quot;<a class="code" href="texture-font_8h.html">texture-font.h</a>&quot;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include &quot;<a class="code" href="texture-atlas_8h.html">texture-atlas.h</a>&quot;</span>
<a name="l00045"></a>00045 
<a name="l00074"></a><a class="code" href="structfont__manager__t.html">00074</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00078"></a><a class="code" href="structfont__manager__t.html#afb6df9aee63801e4ac643d1d6bd4c452">00078</a>     <a class="code" href="structtexture__atlas__t.html" title="A texture atlas is used to pack several small regions into a single texture.">texture_atlas_t</a> * <a class="code" href="structfont__manager__t.html#afb6df9aee63801e4ac643d1d6bd4c452" title="Texture atlas to hold font glyphs.">atlas</a>;
<a name="l00079"></a>00079 
<a name="l00083"></a><a class="code" href="structfont__manager__t.html#a2d2d242c874775c114a4f13a6322dfb7">00083</a>     <a class="code" href="structvector__t.html" title="Generic vector structure.">vector_t</a> * <a class="code" href="structfont__manager__t.html#a2d2d242c874775c114a4f13a6322dfb7" title="Cached textures.">fonts</a>;
<a name="l00084"></a>00084 
<a name="l00088"></a><a class="code" href="structfont__manager__t.html#a448005507b2afc7b58d087c228c0300b">00088</a>     <span class="keywordtype">wchar_t</span> * <a class="code" href="structfont__manager__t.html#a448005507b2afc7b58d087c228c0300b" title="Default glyphs to be loaded when loading a new font.">cache</a>;
<a name="l00089"></a>00089 
<a name="l00090"></a>00090 } <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a>;
<a name="l00091"></a>00091 
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 
<a name="l00104"></a>00104   <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a> *
<a name="l00105"></a>00105   <a class="code" href="group__font-manager.html#ga286fd2880d0964d5ae83d1e4b12f4870" title="Creates a new empty font manager.">font_manager_new</a>( <span class="keywordtype">size_t</span> width,
<a name="l00106"></a>00106                     <span class="keywordtype">size_t</span> height,
<a name="l00107"></a>00107                     <span class="keywordtype">size_t</span> depth );
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 
<a name="l00115"></a>00115   <span class="keywordtype">void</span>
<a name="l00116"></a>00116   <a class="code" href="group__font-manager.html#gab691d11fa02e2409f6f224f42a753b15" title="Deletes a font manager.">font_manager_delete</a>( <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a> *<span class="keyword">self</span> );
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 
<a name="l00128"></a>00128   <span class="keywordtype">void</span>
<a name="l00129"></a>00129   <a class="code" href="group__font-manager.html#ga714764da96215f18f4b48d489cb6b0fb" title="Deletes a font from the font manager.">font_manager_delete_font</a>( <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a> * <span class="keyword">self</span>,
<a name="l00130"></a>00130                             <a class="code" href="structtexture__font__t.html" title="Texture font structure.">texture_font_t</a> * font );
<a name="l00131"></a>00131 
<a name="l00132"></a>00132 
<a name="l00142"></a>00142   <a class="code" href="structtexture__font__t.html" title="Texture font structure.">texture_font_t</a> *
<a name="l00143"></a>00143   <a class="code" href="group__font-manager.html#ga90765b3292194df83f2260211d678e2e" title="Request for a font based on a filename.">font_manager_get_from_filename</a>( <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a> * <span class="keyword">self</span>,
<a name="l00144"></a>00144                                   <span class="keyword">const</span> <span class="keywordtype">char</span> * filename,
<a name="l00145"></a>00145                                   <span class="keyword">const</span> <span class="keywordtype">float</span> size );
<a name="l00146"></a>00146 
<a name="l00147"></a>00147 
<a name="l00159"></a>00159   <a class="code" href="structtexture__font__t.html" title="Texture font structure.">texture_font_t</a> *
<a name="l00160"></a>00160   <a class="code" href="group__font-manager.html#gaf18915a9ec531b4959acdd29fea1b0df" title="Request for a font based on a description.">font_manager_get_from_description</a>( <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a> * <span class="keyword">self</span>,
<a name="l00161"></a>00161                                      <span class="keyword">const</span> <span class="keywordtype">char</span> * family,
<a name="l00162"></a>00162                                      <span class="keyword">const</span> <span class="keywordtype">float</span> size,
<a name="l00163"></a>00163                                      <span class="keyword">const</span> <span class="keywordtype">int</span> bold,
<a name="l00164"></a>00164                                      <span class="keyword">const</span> <span class="keywordtype">int</span> italic );
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 
<a name="l00175"></a>00175   <a class="code" href="structtexture__font__t.html" title="Texture font structure.">texture_font_t</a> *
<a name="l00176"></a>00176   <a class="code" href="group__font-manager.html#gaab7e279a33054137e359e450e2806970" title="Request for a font based on a markup.">font_manager_get_from_markup</a>( <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a> *<span class="keyword">self</span>,
<a name="l00177"></a>00177                                 <span class="keyword">const</span> <a class="code" href="structmarkup__t.html" title="Simple structure that describes text properties.">markup_t</a> *markup );
<a name="l00178"></a>00178 
<a name="l00179"></a>00179 
<a name="l00191"></a>00191   <span class="keywordtype">char</span> *
<a name="l00192"></a>00192   <a class="code" href="group__font-manager.html#gad9b4aaa3f225fa3d17dcaef2dd26d617" title="Search for a font filename that match description.">font_manager_match_description</a>( <a class="code" href="structfont__manager__t.html" title="Structure in charge of caching fonts.">font_manager_t</a> * <span class="keyword">self</span>,
<a name="l00193"></a>00193                                   <span class="keyword">const</span> <span class="keywordtype">char</span> * family,
<a name="l00194"></a>00194                                   <span class="keyword">const</span> <span class="keywordtype">float</span> size,
<a name="l00195"></a>00195                                   <span class="keyword">const</span> <span class="keywordtype">int</span> bold,
<a name="l00196"></a>00196                                   <span class="keyword">const</span> <span class="keywordtype">int</span> italic );
<a name="l00197"></a>00197 
<a name="l00200"></a>00200 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00201"></a>00201 <span class="preprocessor"></span>}
<a name="l00202"></a>00202 <span class="preprocessor">#endif // ifdef __cplusplus</span>
<a name="l00203"></a>00203 <span class="preprocessor"></span>
<a name="l00204"></a>00204 <span class="preprocessor">#endif </span><span class="comment">/* __FONT_MANAGER_H__ */</span>
<a name="l00205"></a>00205 
</pre></div></div><!-- contents -->
</div>
</body>
</html>
